package com.lheia.pipeline

import com.lheia.jcb.spider.PipelineService
import us.codecraft.webmagic.ResultItems
import us.codecraft.webmagic.Task
import us.codecraft.webmagic.pipeline.Pipeline

class GormPipeline implements Pipeline {
    PipelineService pipelineService
    def setSpiderService(PipelineService pipelineService){
        this.pipelineService = pipelineService
    }
    /**
     * Process extracted results.
     *这里待优化，设置将String转各种数据类型
     * @param resultItems resultItems
     * @param task task
     */
    @Override
    void process(ResultItems resultItems, Task task) {
        pipelineService.save(resultItems,task)
    }
}
